<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="../lib/jquery-2.1.1.js"></script>
<script>
$(document).ready(function(){
	// focus 를 받았을때
	$('#mid').focus(function(){
		$('#midOutput').val('영숫자만 입력하세요');
	});
	
	$('#irum').focus(function(){
		$('#irumOutput').val('한글, 영문만 입력하세요');
	});
	
	// focus를 잃었을때
	$('#mid').blur(function(){
		$('#midOutput').val('');
	});
	
	$('#irum').blur(function(){
		$('#irumOutput').val('');
	});
});
</script>
</head>

<body>
<label>아이디 : </label>
<input type="text" id="mid" placeholder="영, 숫자만 입력" autocomplete="off">
<output id="midOutput"></output>
<p/>


<label>성&emsp;명 : </label>
<input type="text" id="irum" placeholder="한글, 영문만 입력" autocomplete="off">
<output id="irumOutput"></output>

</body>
</html>